Fixed crash in mingw build when writing to Cetus format from a GPX file that containe...
authorparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 15 Oct 2003 16:13:10 +0000 (16:13 +0000)
committerparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 15 Oct 2003 16:13:10 +0000 (16:13 +0000)
gpsbabel/cetus.c

index ac48612bad77da3976cf878c9e908ea6f00a24ee..4368bb73e15e108791bf4df3c78c2d153d7d6ae2 100644 (file)
@@ -205,8 +205,7 @@ cetus_writewpt(waypoint *wpt)
 
        rec = xcalloc(sizeof(*rec)+1018,1);
 
-       if (wpt->creation_time) {
-               tm = gmtime(&wpt->creation_time);
+       if (wpt->creation_time && (NULL != (tm = gmtime(&wpt->creation_time)))){
                rec->min = tm->tm_min;
                rec->hour = tm->tm_hour;
                rec->sec = tm->tm_sec;